package com.lefevre.cms.bean.topic;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 话题索引变化
 *
 * @author Lefevre
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("topic_index")
@Entity
@Table(name = "topic_index")
public class TopicIndex implements Serializable {
    private static final long serialVersionUID = 8745684693096984983L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.INPUT)
    private Long id;

    /**
     * 数据Id   数据格式[1:添加 "话题Id"  2.修改 "话题Id"  3.删除 "话题Id"  4.删除 "用户名称"
     **/
    @Column(length = 50)
    private String dataId;

    /**
     * 索引状态  1:添加  2:修改  3:删除 4.删除用户发表的话题
     **/
    private Integer indexState = 1;

    public TopicIndex(String dataId, Integer indexState) {
        this.dataId = dataId;
        this.indexState = indexState;
    }

}
